package websimulator;

import java.util.ArrayList;

public class LevelOfIllumination 
{
    public ArrayList <Double>illumination = new ArrayList<Double>();
    
    /**
     * flux verdier velges vilkårlig
     */
    public LevelOfIllumination()
    {
        for (int i = 0; i < 7; i++)
            illumination.add(75D);
        for (int i = 7; i < 10; i++)
            illumination.add(200D);
        for (int i = 10; i < 17; i++)     
            illumination.add(50D);
        for (int i = 17; i < 22; i++)     
            illumination.add(300D);
        for (int i = 22; i < 25; i++)     
            illumination.add(125D);
    }
    
    /**
     * Brukes i menu
     * @param _yes 
     */
    public LevelOfIllumination(Boolean _yes)
    {
        illumination = new ArrayList<Double>(25);
    }
    
    public ArrayList illuminationLevel()
    {
        return illumination;
    }
    
    public void addLevel(int _time, String _temp)
    {
        illumination.add(_time, Double.parseDouble(_temp));
    }
    
    public void setLevel(int _time, String _temp)
    {
        illumination.set(_time, Double.parseDouble(_temp));
    }
    
    public String getLevel(int _time)
    {
        return illumination.get(_time).toString();
    }
    
}
